package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CreditCharityActivityMapper;
import com.ruoyi.system.domain.CreditCharityActivity;
import com.ruoyi.system.service.ICreditCharityActivityService;

/**
 * 公益活动Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-26
 */
@Service
public class CreditCharityActivityServiceImpl implements ICreditCharityActivityService
{
    @Autowired
    private CreditCharityActivityMapper creditCharityActivityMapper;

    /**
     * 查询公益活动
     * 
     * @param activityId 公益活动主键
     * @return 公益活动
     */
    @Override
    public CreditCharityActivity selectCreditCharityActivityByActivityId(Long activityId)
    {
        return creditCharityActivityMapper.selectCreditCharityActivityByActivityId(activityId);
    }

    /**
     * 查询公益活动列表
     * 
     * @param creditCharityActivity 公益活动
     * @return 公益活动
     */
    @Override
    public List<CreditCharityActivity> selectCreditCharityActivityList(CreditCharityActivity creditCharityActivity)
    {
        return creditCharityActivityMapper.selectCreditCharityActivityList(creditCharityActivity);
    }

    /**
     * 新增公益活动
     * 
     * @param creditCharityActivity 公益活动
     * @return 结果
     */
    @Override
    public int insertCreditCharityActivity(CreditCharityActivity creditCharityActivity)
    {
        return creditCharityActivityMapper.insertCreditCharityActivity(creditCharityActivity);
    }

    /**
     * 修改公益活动
     * 
     * @param creditCharityActivity 公益活动
     * @return 结果
     */
    @Override
    public int updateCreditCharityActivity(CreditCharityActivity creditCharityActivity)
    {
        return creditCharityActivityMapper.updateCreditCharityActivity(creditCharityActivity);
    }

    /**
     * 批量删除公益活动
     * 
     * @param activityIds 需要删除的公益活动主键
     * @return 结果
     */
    @Override
    public int deleteCreditCharityActivityByActivityIds(Long[] activityIds)
    {
        return creditCharityActivityMapper.deleteCreditCharityActivityByActivityIds(activityIds);
    }

    /**
     * 删除公益活动信息
     * 
     * @param activityId 公益活动主键
     * @return 结果
     */
    @Override
    public int deleteCreditCharityActivityByActivityId(Long activityId)
    {
        return creditCharityActivityMapper.deleteCreditCharityActivityByActivityId(activityId);
    }
} 